#include <stdio.h>
double max_sub_min(double arr[], int size);
int main(){
    printf("%.2f", max_sub_min((double[]) {3.0, 35.0, 11.0, 52.0, 8.0}, 5));
    return 0;
}

double max_sub_min(double arr[], int size){
    double max=arr[0];
    double min=arr[0];
    for (int i = 0; i < size; ++i) {
        if (max < arr[i]) {
            max = arr[i];
        }
        if (min > arr[i]) {
            min = arr[i];
        }
    }
    return max - min;
}